﻿using System;
using System.Collections.Generic;
using System.Text;
using DotMail.Commons.DAO;
using System.Xml;

namespace DotMail.Commons.Interfaces
{
    public abstract class PostOfficeInterface
    {
        #region Events
        public virtual event getMessageList GetMessageList;
        public virtual event getFolderList GetFolderList;
        public virtual event getMessage GetMessage;
        public virtual event login Login;
        public virtual event logout LogOut;
        public virtual event changeMessageAttributes ChangeMessageAttributes;
        public virtual event copyMessage MoveMessage;
        public virtual event deleteMessage DeleteMessage;
        public virtual event createFolder CreateFolder;
        public virtual event getMessageAttributes GetMessageAttributes;
        public virtual event changeFolder ChangeFolder;
        #endregion

        #region Properties
        public bool IsMDA { get; set; }
        public bool IsMTA { get; set; }
        #endregion

        #region Methods
        /// <summary>
        /// If the plugin is an MDA the Kernel uses this function to
        /// tell it to start listening for incoming messages
        /// </summary>
        public abstract void StartListening();

        public abstract void LoadConfig(XmlNode config);
        
        #endregion
    }
}
